use "${datadir}\HTB_main", replace

keep if htb_dummy 
gen etv = equity/purchaseprice * 100
gen dtv = (deposit/1000) /purchaseprice * 100

keep if htb_london

hist dtv, frac ${graphoption} ti("Down payment to value") yti(Fraction of EL transactions) ///
	name(gr1, replace) xti(%) ylabel(0(.2)1)	// ylabel to make two charts homogenous

hist etv, frac ${graphoption} ti("Equity loan to value") yti(Fraction of EL transactions) ///
	name(gr2, replace) xti(%) ylabel(0(.2)1)
		
gr combine gr1 gr2, graphregion(color(white)) xsize(8) ycommon scale(1.2)
graph export "${figuredir}\Figure2_HCA_dtv_etv${london}.pdf", ///
	as(pdf) replace